package com.example.lxy.service.impl;

import com.example.lxy.mapper.UserMapper;
import com.example.lxy.pojo.access;
import com.example.lxy.pojo.user;
import com.example.lxy.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Component
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public boolean add(user u) {
        return userMapper.add(u);
    }

    @Override
    public user login(String username, String password) {
        return userMapper.login(username,password);
    }

    @Override
    public List<user> list(String nickname) {
        return userMapper.list(nickname);
    }

    @Override
    public List<access> lists() {
        return userMapper.lists();
    }

    @Override
    public List<user> listbiao() {
        return userMapper.listbiao();
    }

    @Override
    public void deluser(int uid) {
        userMapper.deluser(uid);
    }

    @Override
    public user upiduser(int uid) {
        return userMapper.upiduser(uid);
    }

    @Override
    public void updateuser(user u) {
        userMapper.updateuser(u);
    }

    @Override
    public user reglist(String username) {
        return userMapper.reglist(username);
    }

    @Override
    public user reglist1(String nickname) {
        return userMapper.reglist1(nickname);
    }

    @Override
    public List<user> likelist(String nickname) {
        return userMapper.likelist(nickname);
    }
}
